﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminSite.Master" AutoEventWireup="true" CodeBehind="NhomSanpham.aspx.cs" Inherits="Web.Admin.NhomSanpham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="Content">
    <div id="content">
    <div id="titleAd"><h4>Quản lý Phân loại sản phẩm</h4></div>
    <div id="divbtnThem">
        <asp:LinkButton ID="btnThem" runat="server" CommandName="insert" Height="30px" 
            onclick="btnThem_Click" ToolTip="Thêm mới" Width="90px">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Admin/images/ADD.ICO" />Thêm mới</asp:LinkButton>
    </div>
    <div id="bangPL">
        <asp:DataGrid ID="GridNhomSP" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" Width="100%" 
            BorderColor="Silver" BorderWidth="1px" PageSize="10" 
            onitemcommand="GridNhomSP_ItemCommand" 
            onpageindexchanged="GridNhomSP_PageIndexChanged">
            <AlternatingItemStyle BackColor="White" />
            <Columns>
                <asp:BoundColumn DataField="Ma_Phan_loai" HeaderText="Mã Phân loại" ItemStyle-Width="100px"></asp:BoundColumn>
                <asp:BoundColumn DataField="Ten_Phan_loai" HeaderText="Tên Phân loại" ItemStyle-Width="200px"></asp:BoundColumn>
                <asp:TemplateColumn>
                    <HeaderTemplate>Thao tác</HeaderTemplate>
                    <ItemTemplate>
                        <asp:ImageButton ID="imgSua" runat="server" ImageUrl="~/Admin/images/edit.png" ToolTip="Sửa" CommandName="Edit" 
                            BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Ma_Phan_loai") %>'/>&nbsp;|
                        <asp:ImageButton ID="imgXoa" runat="server" ImageUrl="~/Admin/images/cross.png" ToolTip="Xóa" CommandName="Delete" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Ma_Phan_loai") %>'
                            BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" OnClientClick="return confirm('Bạn có chắc chắn xóa?')" />
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
            <EditItemStyle BackColor="#2461BF" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="true" ForeColor="White" />
            <ItemStyle BackColor="#EFF3FB" />
            <PagerStyle BackColor="#F3F8FE"  ForeColor="Blue" HorizontalAlign="Center" Mode="NumericPages" />
            <SelectedItemStyle BackColor="#D1D0F1" Font-Bold="true" ForeColor="#333333" />
        </asp:DataGrid></div>
    <div id="khungchitiet"><asp:Panel ID="panelchitiet" runat="server" Enabled="False">
        
        <table style="border-style: solid; border-collapse:collapse; width:100%; border-top-width: 1px; border-top-color: #C0C0C0;" 
            border="1" id="tblChitiet">
            <tr>
                <td style="color: #FFFFFF; background-color: #507CD1; font-weight: bold;"><asp:Label ID="Label1" runat="server" Text="Mã Nhóm"></asp:Label></td>
                <td><asp:TextBox ID="txtMa" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="color: #FFFFFF; font-weight: bold; background-color: #507CD1"><asp:Label ID="Label2" runat="server" Text="Tên Nhóm"></asp:Label></td>
                <td><asp:TextBox ID="txtTen" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:ImageButton ID="imgLuu" runat="server" ImageUrl="~/Admin/images/ok.ico" 
                        BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" 
                        ToolTip="Lưu" Height="20px" Width="20px" 
                        onclick="imgLuu_Click" />&nbsp;|
                    <asp:ImageButton ID="imgBack" runat="server" 
                        ImageUrl="~/Admin/images/back.png" BorderColor="#CCCCCC" BorderStyle="Solid" 
                        BorderWidth="1px" ToolTip="Trở ra" Height="20px" Width="20px" 
                        onclick="imgBack_Click" />
                </td>
            </tr>
        </table></asp:Panel></div>
    </div>
</asp:Content>

